summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bcat/news/news_service.cpp
blob: e19cea7b54848c9812dcd476a9b8b20c18c90f90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later

#include "core/hle/service/bcat/news/news_service.h"
#include "core/hle/service/cmif_serialization.h"

namespace Service::News {

INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "INewsService"} {
    // clang-format off
    static const FunctionInfo functions[] = {
        {10100, nullptr, "PostLocalNews"},
        {20100, nullptr, "SetPassphrase"},
        {30100, C<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
        {30101, nullptr, "GetTopicList"},
        {30110, nullptr, "Unknown30110"},
        {30200, nullptr, "IsSystemUpdateRequired"},
        {30201, nullptr, "Unknown30201"},
        {30210, nullptr, "Unknown30210"},
        {30300, nullptr, "RequestImmediateReception"},
        {30400, nullptr, "DecodeArchiveFile"},
        {30500, nullptr, "Unknown30500"},
        {30900, nullptr, "Unknown30900"},
        {30901, nullptr, "Unknown30901"},
        {30902, nullptr, "Unknown30902"},
        {40100, nullptr, "SetSubscriptionStatus"},
        {40101, nullptr, "RequestAutoSubscription"},
        {40200, nullptr, "ClearStorage"},
        {40201, nullptr, "ClearSubscriptionStatusAll"},
        {90100, nullptr, "GetNewsDatabaseDump"},
    };
    // clang-format on

    RegisterHandlers(functions);
}

INewsService::~INewsService() = default;

Result INewsService::GetSubscriptionStatus(Out<u32> out_status,
                                           InBuffer<BufferAttr_HipcPointer> buffer_data) {
    LOG_WARNING(Service_BCAT, "(STUBBED) called, buffer_size={}", buffer_data.size());
    *out_status = 0;
    R_SUCCEED();
}

} // namespace Service::News